from pydub import AudioSegment

def get_sample_rate_pydub(file_path):
    audio = AudioSegment.from_file(file_path)
    return audio.frame_rate

# 示例
file_path = "example.mp3"
sample_rate = get_sample_rate_pydub(file_path)
print(f"采样率: {sample_rate} Hz")